#pragma once
#include <math.h>

class Potens
{
public:

	Potens(void)
	{
	}

	double PotencyRec(double x, int n)
	{
		double summa;
		if(n > 0)
		{
			return PotencyRec(x, n-1)*x;
		}
		else
			return 1;
	}

	double PotencyIte(double x, int n)
	{
		double summa = x;
		for (int i = 0; i < n-1; i++)
		{
			summa*=x;
		}
		return summa;
	}


	~Potens(void)
	{
	}
};

